package com.platform.demo.web;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.platform.common.annotation.SystemControllerLog;
import com.platform.demo.entity.User;
import com.platform.demo.service.UserService;

@Controller
public class HelloWorldAction {

	private final Logger logger = LoggerFactory.getLogger(HelloWorldAction.class);

	@Resource
	private UserService userService;

	@RequestMapping("/hello.action")
	@ResponseBody
//	@SystemControllerLog(ModuleID=1,LogAction="hello",LogContent="测试示例")
	public User hello() {
		User user = userService.queryById(2L);
		logger.info("=========" + user.toString());
		return user;
	}
}
